import {createStore,applyMiddleware,combineReducers} from 'redux'
//引入为Count组件服务的reducer
import count_reducer from './reducers/count'
import person_reducer from './reducers/person'
import thunk from 'redux-thunk'
//暴露store,redux-thunk是让action支持异步操作
//combineReducers汇总所有的reducer
const allReducers=combineReducers({
  sum:count_reducer,
  person_array:person_reducer
})
// export default createStore(count_reducer,applyMiddleware(thunk))
export default createStore(allReducers,applyMiddleware(thunk))